import Relay from "react-relay";

export default class OrderProgressMutation extends Relay.Mutation {

    static fragments = {};

    getMutation() {
        return Relay.QL`mutation { queryMessagesByOrderId }`;
    }

    getVariables() {
        return {
            argsInput: {
              msgType: this.props.msgType,
              orderId: this.props.orderId,
              enId: this.props.enId
            }
        };
    }

    getFatQuery() {
        return Relay.QL`fragment on queryMessagesByOrderIdPayload {
            queryMessagesByOrderId {
                errorCode
                value
                totalResult
                id
                messageAll{
                  isDelete
                  addExplain
                  msgDetails
                  userId
                  msgCreateDate
                  yiDetail
                  label
                  status
                  send
                  companyName
                  orderId
                  msgType
                  operator
                  jiaDetail
                  msgStatus
                  enId
                  mid
                  orderStatus
                  actionStatus
                  companyJiaId
                  companyYiId
                  companyYiName
                  userIdYi
                  money
                }
            }
        }`;
    }

    getConfigs() {
        return [{
            type: 'REQUIRED_CHILDREN',
            children: [Relay.QL`
               fragment on queryMessagesByOrderIdPayload {
                  queryMessagesByOrderId {
                      errorCode
                      value
                      totalResult
                      id
                      messageAll{
                        isDelete
                        addExplain
                        msgDetails
                        userId
                        msgCreateDate
                        yiDetail
                        label
                        status
                        send
                        companyName
                        orderId
                        msgType
                        operator
                        jiaDetail
                        msgStatus
                        enId
                        mid
                        orderStatus
                        actionStatus
                        companyJiaId
                        companyYiId
                        companyYiName
                        userIdYi
                        money
                      }
                  }
                }
            `]
        }];
    }

}
